//
//  ServiceUtils.m
//  suRead
//
//  Created by lidi on 15/11/6.
//  Copyright © 2015年 bao. All rights reserved.
//

#import "ServiceUtils.h"
#import "AFNetworking.h"

@implementation ServiceUtils

+ (AFHTTPSessionManager *)commonHTTPManager
{
    
//    NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
//    [config setHTTPAdditionalHeaders:@{ @"User-Agent" : @"KCT 3.0"}];
//    AFHTTPSessionManager *manager=[[AFHTTPSessionManager alloc] initWithBaseURL:baseURL sessionConfiguration:config];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    [manager.requestSerializer setValue:@"KCT 3.0" forHTTPHeaderField:@"sysVersion"];
    return manager;
}

+ (AFHTTPSessionManager *)commonHTTPManager2
{
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    [manager.requestSerializer setValue:@"KCT 3.0" forHTTPHeaderField:@"sysVersion"];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"application/json"];
    return manager;
}

@end
